package com.feihao.zhou.demo01_Thread;

import java.io.File;
import java.io.IOException;

public class FileDemo01 {
    public static void main(String[] args) throws IOException {
        File file = new File("H:\\新建文件夹\\123.txt");
        /*System.out.println(file);
        //创建123.txt文件
        boolean newFile = file.createNewFile();*/


        //
        File file1 = new File("H:\\新建文件夹\\aaa");
        //创建aaa文件夹
//        boolean mkdirs = file1.mkdirs();


        String path = "H:\\新建文件夹";
        File file2 = new File(path,"456.txt");
        //创建H:\新建文件夹路径下456.txt文件。
        file2.createNewFile();


        //删除123.txt文件
        boolean delete = file.delete();
        System.out.println(delete);

        //删除456.txt文件：
        boolean delete1 = file2.delete();
        System.out.println(delete1);

        //删除aaa文件夹：
        boolean delete3 = file1.delete();

    }
}
